CDbl and ToNumber (numeric), ToNumber (string), ToNumber (Boolean) are equivalent functions.
number or currency is a Number or Currency value or expression. | |
CDbl returns a Number value created by converting the given Number, Currency or String type argument to a Number value. If the conversion cannot be done, an error occurs.
The following examples are applicable to both Basic and Crystal syntax:
Returns the value of the Currency field {Orders.Order Amount} converted to Number type.
Returns the Number value of 120.2.
You can use the IsNumeric (str) or NumericText (str) function to check if the String argument can be converted to a Currency before doing the actual conversion. That way, if the conversion cannot be done, you can handle the situation appropriately.
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |